//
// Created by hps on 24-4-19.
//

#ifndef LINEINPUTER_H
#define LINEINPUTER_H

#include "HeadFiles.h"

namespace hps {

class LineInputer: public QWidget {
Q_OBJECT
public:
    LineInputer(const std::string &labelText);
    void init();
    void setUi();
    QHBoxLayout* getLayout() const { return m_Layout; }
    std::string getLineEditComment() { return m_LineEdit -> text().toStdString(); }
    void setText(const QString& text);
    void setLineEditReadOnly() { m_LineEdit->setReadOnly(true); }
private:
    // 输入框的组件
    QHBoxLayout *m_Layout;
    QLabel *m_Label;
    QLineEdit *m_LineEdit;

    std::string m_labelText;
};

} // hps

#endif //LINEINPUTER_H
